@extends('_layout.master')

@section('style')
    <link href="{{ asset('unitegallery/css/unite-gallery.css') }}" rel="stylesheet">
    <link href="{{ asset('unitegallery/themes/default/ug-theme-default.css') }}" rel="stylesheet">
@endsection

@section('right')
    <div class="col-md-9">
        <div class="row border1">
            <div class="col-md-5">
                <span class="list-icon pull-left"></span>
                <h4 style="color: #ff6637;" class="pull-left">产品展示</h4>
            </div>
        </div>
        <div class="row text-center">
            <h4 style="color: #ff6637;">{{ $product->name }}</h4>
        </div>
        <div class="row">
            <div class="container" style="width: 600px;">
                @if(!empty($product->pictures[0]))
                    <div id="gallery" style="display:none;">
                        @foreach($product->pictures as $picture)
                            <img src="{{ asset('upload/'.$picture) }}"
                                 data-image="{{ asset('upload/'.$picture) }}">
                        @endforeach
                    </div>
                @else
                    <h5 class="text-center" style="color: #aaaaaa;">暂无产品展示图</h5>
                @endif
            </div>
        </div>
        <div class="row border1" style="margin-top: 20px;">
            <div class="col-md-5">
                <span class="list-icon pull-left"></span>
                <h4 style="color: #ff6637;" class="pull-left">产品介绍</h4>
            </div>
        </div>
        <div class="row">
            {!! $product->introduce !!}
        </div>
    </div>
@endsection

@section('script')
    <script src="{{ asset('unitegallery/js/unitegallery.min.js') }}"></script>
    <script src="{{ asset('unitegallery/themes/default/ug-theme-default.js') }}"></script>
    <script>
        $(function () {
            $('#gallery').unitegallery();
        })
    </script>
@endsection